#ifndef _GPS_H
#define _GPS_H

#include "GPIO.h"
#include "stm32f10x.h"
#include "UART.h"
#include "main.h"

typedef enum
{
	GPS_ENABLE = 0,
	GPS_STANDBY = 1,
	GPS_RESET = 2
} Gps_TypeDef;

#define GPSnPIN                             	3			// number pins use for GPS

#define GPS_ENABLE_PIN			GPIO_Pin_6
#define GPS_ENABLE_PORT        	GPIOA
#define GPS_ENABLE_CLK              RCC_APB2Periph_GPIOA

#define GPS_STANDBY_PIN		GPIO_Pin_5
#define GPS_STANDBY_PORT         GPIOA
#define GPS_STANDBY_CLK            RCC_APB2Periph_GPIOA

#define GPS_RESET_PIN			GPIO_Pin_4
#define GPS_RESET_PORT        	GPIOA
#define GPS_RESET_CLK          	 RCC_APB2Periph_GPIOA

void GPSInitController(void);
void GPS_ENABLE_On(void);
void GPS_ENABLE_Off(void);
void GPS_STANDBY_On(void);
void GPS_STANDBY_Off(void);
void GPS_RESET_On(void);
void GPS_RESET_Offvoid(void);


void UART_GPS_ISR(void);
void UART_GPS_SendByte(uint8_t data);
void UART_GPS_SendString(uint8_t *data);
uint8_t UART_GPS_ReceivedByte(void);
void UART_GPS_ReceivedString(uint8_t *data_buff, uint8_t data_len);
uint8_t UART_GPS_RXAvailable(void);
void UART_GPS_RXFlush(void);

#endif 
